package com.ydt.dockingclients.controller;

import cn.hutool.http.server.HttpServerRequest;
import com.alibaba.fastjson2.JSON;
import com.ydt.dockingclients.response.YdtNoticeResponseHandel;
import com.ydt.dockingclients.response.YdtStationListDataResponse;
import com.ydt.dockingclients.utils.HttpServletRequestReader;
import com.ydt.dockingclients.utils.YdtSdkResult;
import jakarta.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

@Slf4j
@RestController
@RequestMapping("/api/ytd/v1.8/station/notice")
public class NoticeStationController {

    /**
     * 油站变更推送（接收运达通通知接口）
     *
     * @param request
     * @return
     */
    @PostMapping("/notice/change")
    public YdtSdkResult changeNotice(HttpServletRequest request) {
        YdtStationListDataResponse.DataDTO.RowsDTO ydtStationDataList = YdtNoticeResponseHandel.changeNotice(request);

        /**
         * 业务处理
         */
        return YdtSdkResult.success();
    }
}
